import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.orm.hibernate5.HibernateTemplate;


public class test1 {

    @Test
    public void test1(){
        // 1.获取Spring容器
        ApplicationContext ac = new ClassPathXmlApplicationContext("appliactionContext.xml");
        // 2.根据id获取bean对象
        HibernateTemplate ht = (HibernateTemplate) ac.getBean("hibernateTemplate");
        // 3.执行操作

    }
}
